package com.ruibang.glass.file.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruibang.glass.common.domain.file.FileBusiness;
import com.ruibang.glass.file.domain.req.FileInfoReq;
import com.ruibang.glass.file.domain.req.PreviewFileReq;
import com.ruibang.glass.file.entity.FileInfo;
import com.teaming.cloud.framework2.common.pojo.PageResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;

public interface FileService extends IService<FileInfo> {

    String uploadFile(MultipartFile file);

    List<String> uploadFiles(List<MultipartFile> files);

    String previewFile(PreviewFileReq previewFileReq);

    List<String> getPreviewByBusinessParam(FileBusiness fileBusiness);

    List<FileInfo> previewFiles(PreviewFileReq previewFileReq);

    List<FileInfo> previewLocalFiles(List<String> fileIds);

    void deleteById(String fileId);

    PageResult<FileInfo> queryPage(FileInfoReq infoReq);

    List<FileInfo> queryFiles(FileInfo info);

    void updateBusinessById(FileBusiness fileBusiness);

    void deleteByBusinessId(String businessId);

    void deleteByFileIds(List<String> fileIds);

    List<String> getFileIdsByBusinessId(String businessId);

    List<FileBusiness> getFileBusinessByIds(List<String> businessIds);

    FileInfo getDetails(String businessId);


    List<FileInfo> getFileInfoByBusinessIds(List<String> businessIds);

    void downLoad(String id, HttpServletResponse response);

    List<FileInfo> getFileInfoByFileIds(List<String> fileIds);

    void deleteByBusinessIdAndAttribute(FileBusiness fileBusiness);


}
